package com.example.com.skills_utf8;

import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Timer;
import java.util.TimerTask;

import org.apache.http.message.BasicNameValuePair;
import org.json.JSONException;

import view.Arcs;

import com.secret.aes;
import com.utils.NetHelper;

import android.app.Activity;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

public class _43Activity extends Activity{

	_43Activity activity = this;
	
	Timer timer = new Timer();
	
	int progress = 0;
	
	
	
	private ImageView iv;
	
	
	
	Handler handler = new Handler(){
		public void handleMessage(android.os.Message msg) {
			
			iv.setImageDrawable(null);
			
		};
	};

	
	
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_43);
		
		iv = (ImageView)findViewById(R.id.iv);
		final Arcs arcs = (Arcs)this.findViewById(R.id.arcs);
		
		
		timer.schedule( new TimerTask() {
			
			@Override
			public void run() {
				// TODO Auto-generated method stub
				
				
				activity.runOnUiThread( new Runnable() {
					
					@Override
					public void run() {
						// TODO Auto-generated method stub
						
						if(progress >= 100){
							progress = 100;
							handler.sendEmptyMessage(0);
							timer.cancel();
						}
						else{
							progress +=10;
						}
						arcs.setProgress(progress);
						
						
						
					}
				});
				
			
				
			}
		}, 0, 1000);
		
		
		
		
		//--
		Drawable cover_bg = activity.getResources().getDrawable(R.drawable.platform_myspace_grid_item_cover);
		iv.setImageDrawable(cover_bg);
		
		iv.setBackgroundResource(R.drawable.fly);
		
		
	}
	
	
	
	
	
}
